import request from "@/utils/request";

/**
 * @description 域名列表
 * @param data
 * @returns
 */
export const getHostList: any = function (params: any) {
  return request.get("htscrm/system_host/list", { params });
};

/**
 * @description 门店列表
 * @param data
 * @returns
 */
export const hostStore: any = function (params: any) {
  return request.get("htscrm/system_host/store", { params });
};

/**
 * @description 获取域名数量
 * @param data
 * @returns
 */
export const hostAddDomain: any = function (params: any) {
  return request.post("htscrm/system_host/add_domain", params);
};

/**
 * @description 添加域名
 * @param data
 * @returns
 */
export const hostAddHost: any = function (params: any) {
  return request.post("htscrm/system_host/add_host", params);
};

/**
 * @description 绑定门店
 * @param data
 * @returns
 */
export const hostStoreBind: any = function (params: any) {
  return request.post("htscrm/system_host/store_bind", params);
};

/**
 * @description 删除门店
 * @param data
 * @returns
 */
export const hostDelBind: any = function (params: any) {
  return request.post("htscrm/system_host/del_bind", params);
};

/**
 * @description 域名授权
 * @param data
 * @returns
 */
export const hostAuthHost: any = function (params: any) {
  return request.post("htscrm/system_host/auth_host", params);
};

/**
 * @description 批量更新域名
 * @param data
 * @returns
 */
export const hostUpdateDomain: any = function (params: any) {
  return request.post("htscrm/system_host/update_domain", params);
};

/**
 * @description 获取门店所有列表
 * @param data
 * @returns
 */
export const getStoreList: any = function (params: any) {
  return request.get("htscrm/store/list", { params });
};


/**
 * @description 域名配置列表
 * @param data
 * @returns
 */
export const getCdnHostList: any = function (params: any) {
  return request.get("htscrm/cdn_host/list", { params });
};

/**
 * @description 添加加速域名
 * @param data
 * @returns
 */
export const addCdnHost: any = function (params: any) {
  return request.post("htscrm/cdn_host/add_host", params);
};

/**
 * @description 编辑加速域名
 * @param data
 * @returns
 */
export const editCdnHost: any = function (params: any) {
  return request.post("htscrm/cdn_host/edit_host", params);
};

/**
 * @description 创建加速域名认证
 * @param data
 * @returns
 */
export const createCdnAuth: any = function (params: any) {
  return request.post("htscrm/cdn_host/create_auth", params);
};

/**
 * @description 认证加速域名
 * @param data
 * @returns
 */
export const verifyCdnAuth: any = function (params: any) {
  return request.post("htscrm/cdn_host/verify_auth", params);
};

/**
 * @description 创建加速域名
 * @param data
 * @returns
 */
export const createCdn: any = function (params: any) {
  return request.post("htscrm/cdn_host/create_cdn", params);
};

/**
 * @description 禁用加速域名
 * @param data
 * @returns
 */
export const disableCdn: any = function (params: any) {
  return request.post("htscrm/cdn_host/disable_cdn", params);
};

/**
 * @description 启用加速域名
 * @param data
 * @returns
 */
export const enableCdn: any = function (params: any) {
  return request.post("htscrm/cdn_host/enable_cdn", params);
};

/**
 * @description 刷新加速域名状态
 * @param data
 * @returns
 */
export const reloadCdn: any = function (params: any) {
  return request.post("htscrm/cdn_host/reload_cdn", params);
};

/**
 * @description 删除加速域名
 * @param data
 * @returns
 */
export const removeCdn: any = function (params: any) {
  return request.post("htscrm/cdn_host/remove_cdn", params);
};